import {request} from "@/utils/service"

export const downloadReq = {
  baseUrl: '/download',
  getDownloadList(data) {
    return request({
      url: this.baseUrl + "/getDownloadList",
      method: "post",
      isSearchList: true,
      showLoading: false,
      data
    })
  },
  getDownloadListType() {
    return request({
      url: this.baseUrl + "/getDownloadListType",
      method: "post",
    })
  },
  submitDownload(data) {
    return request({
      url: this.baseUrl + "/submitDownload",
      method: "post",
      data
    })
  },
  getDownloadDetails(downloadId) {
    return request({
      url: this.baseUrl + "/getDownloadDetails",
      method: "post",
      params: {
        downloadId
      },
      showLoading: false,
    })
  },
  delDownload(downloadId) {
    return request({
      url: this.baseUrl + "/delDownload",
      method: "post",
      params: {
        downloadId
      },
    })
  },
  downloadAgain(downloadId) {
    return request({
      url: this.baseUrl + "/downloadAgain",
      method: "post",
      params: {
        downloadId
      },
    })
  },
  threadInfo() {
    return request({
      url: this.baseUrl + "/threadInfo",
      method: "post",
    })
  },
  deleTheard(threadId) {
    return request({
      url: this.baseUrl + "/deleTheard",
      method: "post",
      data: threadId
    })
  },
  urlParsing(formData) {
    return request({
      url: this.baseUrl + "/urlParsing",
      method: "post",
      data: formData
    })
  },
}
